import {createRouter, createWebHashHistory} from "vue-router"

import A51 from '../views/A51.vue'
import A52 from '../views/A52.vue'
//路由，代表着路径与组件的关系
const routes = [{path: '/a1', component: A51}, {path: '/a2', component: A52},
    {
        path: '/a3',
        component: () => import('../views/A53.vue')
        , redirect: '/a3/student',
        children: [{path: 'student', component: () => import('../views/A531.vue')}, {
            path: 'teacher',
            component: () => import('../views/A532.vue')
        }]
    }, {

        path: '/:pathMatch(.*)*', redirect: '/a2'
    }
]

const router = createRouter({
    history: createWebHashHistory(), //
    routes: routes
});


export default router;
